package work.xiaohong.mybatisplus.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;

import static io.swagger.v3.oas.annotations.media.Schema.AccessMode.READ_ONLY;

/**
 * 卡表
 * @author xiaohong
 * @since 2021-10-22 10:10:22
 */
@Getter
@Setter
@TableName("card")
@Schema(name = "Card对象", description = "卡表")
public class Card implements Serializable {

    private static final long serialVersionUID = 1L;

    @Schema(description = "卡ID",accessMode = READ_ONLY)
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @Schema(description = "卡号")
    @TableField("card_no")
    private String cardNo;

    @Schema(description = "卡中余额（单位:分）")
    @TableField("balance")
    private Integer balance;

    @Schema(description = "用户ID")
    @TableField("user_id")
    private Long userId;


}
